Skip to content

Apply SELECT policies if RETURNING has cols #19720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rmloveland
Copy link
Contributor

Fixes DOC-13890

@rmloveland rmloveland requested a review from spilchen June 5, 2025 20:24
Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 805ac45
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/685310fb2095c90008778d4f

Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 805ac45
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/685310fb7f47dd0009353e94

Copy link

github-actions bot commented Jun 5, 2025

Files changed:

Copy link

netlify bot commented Jun 5, 2025

Netlify Preview

Name Link
🔨 Latest commit 805ac45
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/685310fbf350b8000885a6f5
😎 Deploy Preview https://deploy-preview-19720--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rmloveland rmloveland requested a review from spilchen June 10, 2025 19:40
@rmloveland rmloveland requested a review from spilchen June 18, 2025 15:29
@rmloveland
Copy link
Contributor Author

thanks for the review comments @spilchen , I've taken a shot at updating based on your latest feedback, PTAL

Copy link

@spilchen spilchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for revising.

One minor comment, but I'll leave it to you if you want to apply it: I'm wondering if you want to reverse the definition of ✓(b) and ✓(a) since the description of ✓(a) references ✓(b)?

Something like:

  • ✓: Always applied.
  • (a): A USING policy failure causes the statement to fail. Normally, USING filters out rows silently.
  • (b): Like ✓(a), but only applied when the statement references row columns (WHERE, SET, or RETURNING). If the policy is violated, the statement fails.

@rmloveland
Copy link
Contributor Author

Looks good. Thanks for revising.

Thank YOU for reviewing!

One minor comment, but I'll leave it to you if you want to apply it: I'm wondering if you want to reverse the definition of ✓(b) and ✓(a) since the description of ✓(a) references ✓(b)?

Something like:

  • ✓: Always applied.
  • (a): A USING policy failure causes the statement to fail. Normally, USING filters out rows silently.
  • (b): Like ✓(a), but only applied when the statement references row columns (WHERE, SET, or RETURNING). If the policy is violated, the statement fails.

Yes I think that's way clearer! Have swapped (a) and (b) the footnotes and also in the table cells in 805ac45

@rmloveland rmloveland requested a review from taroface June 18, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants